#!C:\Python25
#coding:utf-8

from distutils.core import setup   
import py2exe   
import sys
import glob
    
# If run without args, build executables, in quiet mode.
if len(sys.argv) == 1:
    sys.argv.append("py2exe")
    #sys.argv.append("-i")
    
    
class Target:
    def __init__(self, **kw):
        self.__dict__.update(kw)
        # for the versioninfo resources
        self.version = "0.2.0"
        self.company_name = "Yaxon Co."
        self.license = "GNU General Public License"
        self.name = "vehiclehunter"
        


'''  
vh_edit = Target(
    description = "vh_edit app",
    script = "vh_edit.py",
    )
'''

vehiclehunter_server = Target(
    description = "vehiclehunter_server",
    script = "vhserver.py",
    icon_resources = [(0, "images/vhserver.ico")],
    )

vehiclehunter = Target(
    description = "vehiclehunter app",
    script = "vehiclehunter.py",
    icon_resources = [(1, "images/vehiclehunter.ico")],
    )
    
    
includes = ["encodings", "encodings.*"]
excludes = ["pywin", "pywin.debugger", "pywin.debugger.dbgcon",
            "pywin.dialogs", "pywin.dialogs.list"]   
options = {"py2exe":   
            {   "compressed": 1,   
                "optimize": 2,   
                "includes": includes,
                #"excludes": excludes,  
                "bundle_files": 2,
                #"typelibs": [('{9D6ED199-5910-11D2-98A6-00A0C9742CCA}',0,4,0)],
            } 
          }   
setup(        
    options = options,   
    zipfile = 'lib/library.zip',
    data_files = [("images",glob.glob("images/*.png")),
                  ("images",glob.glob("images/*.ico")),
                  ("script",glob.glob("script/*.test")),
                  ],
    windows = [vehiclehunter, vehiclehunter_server],
    ) 
